home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 330 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.0 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c,comp.std.c
  4. Subject: Re: Integral conversion e.t.c. (was: Re: Hungarian notation)
  5. Date: Thu, 08 Feb 96 23:20:26 GMT
  6. Organization: none
  7. Message-ID: <823821626snz@genesis.demon.co.uk>
  8. References: <30C40F77.53B5@swsbbs.com> <SPENCER.96Jan22113215@zorgon.ERA.COM> <TANMOY.96Jan29183041@qcd.lanl.gov> <823011209snz@genesis.demon.co.uk> <4epvo3$b2q@natasha.rmii.com>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <4epvo3$b2q@natasha.rmii.com> jcoffin@rmii.com "Jerry Coffin" writes:
  15.  
  16. >Lawrence Kirby <fred@genesis.demon.co.uk> wrote:
  17. >
  18. >>Unfortunately there are some. For instance POSIX defines fdopen() and
  19. >>fileno() in stdio.h. It would have made more sense to put these in unistd.h
  20. >>alongsize read, write and close, even though that means defining FILE
  21. >>in unistd.h
  22. >
  23. >However, this only happens if _POSIX_SOURCE is defined.  _POSIX_SOURCE
  24. >is in the implementor's name space, so no strictly conforming program
  25. >defines it.  As such, stdio.h can (and certainly should) be defined to
  26. >allow POSIX conformance without bothering C programs that want to use
  27. >the same names for other purposes.
  28.  
  29. It remains extremely unfortunate that I have to define _POSIX_SOURCE (with
  30. all of its other consequences) just to get fdopen() (plus various other
  31. things) declared. It just makes much more sense to keep POSIX headers
  32. entirely separate from ANSI headers.
  33.  
  34. I'll try to get back on topic now! :-)
  35.  
  36. Also it depends on what exactly defines _POSIX_SOURCE. If it is in the
  37. program source then all bets are off. If on the other hand the implemenation
  38. defined it (say in response to a compiler command line argument) then it
  39. ceases to be ANSI conforming by declaring fdopen().
  40.  
  41. -- 
  42. -----------------------------------------
  43. Lawrence Kirby | fred@genesis.demon.co.uk
  44. Wilts, England | 70734.126@compuserve.com
  45. -----------------------------------------
  46.